package com.lagou.biz.listener;

import com.lagou.factory.AnnotationConfigApplicationContext;
import com.lagou.utils.PropertyUtil;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * desc:
 *
 * @author tengfei wang
 * @version 1.0
 * @date Created in 8/9/2020
 */
public class ApplicationContextListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        new AnnotationConfigApplicationContext(PropertyUtil.getBasePackage());
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
